home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 85 / CD Actual 85 Febrero 2004.iso / Experto / Apache / apache_2.0.48-win32-x86-no_ssl.msi / Data.Cab / F252783_mod_ssl.xml < prev    next >
Encoding:
Extensible Markup Language  |  2003-06-30  |  70.6 KB  |  1,467 lines

  1. <?xml version="1.0"?>
  2. <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
  3. <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
  4. <modulesynopsis metafile="mod_ssl.xml.meta">
  5.  
  6. <name>mod_ssl</name>
  7. <description>Strong cryptography using the Secure Sockets
  8. Layer (SSL) and Transport Layer Security (TLS) protocols</description>
  9. <status>Extension</status>
  10. <sourcefile>mod_ssl.c</sourcefile>
  11. <identifier>ssl_module</identifier>
  12.  
  13. <summary>
  14. <p>This module provides SSL v2/v3 and TLS v1 support for the Apache
  15. HTTP Server.  It was contributed by Ralf S. Engeschall based on his
  16. mod_ssl project and originally derived from work by Ben Laurie.</p>
  17.  
  18. <p>This module relies on <a href="http://www.openssl.org/">OpenSSL</a>
  19. to provide the cryptography engine.</p>
  20.  
  21. <p>Further details, discussion, and examples are provided in the
  22. <a href="../ssl/">SSL documentation</a>.</p>
  23. </summary>
  24.  
  25. <section id="envvars"><title>Environment Variables</title>
  26.  
  27. <p>This module provides a lot of SSL information as additional environment
  28. variables to the SSI and CGI namespace. The generated variables are listed in
  29. the table below. For backward compatibility the information can
  30. be made available under different names, too. Look in the <a
  31. href="../ssl/ssl_compat.html">Compatibility</a> chapter for details on the
  32. compatibility variables.</p>
  33.  
  34. <table border="1">
  35. <tr>
  36.  <th>Variable Name:</th>
  37.  <th>Value Type:</th>
  38.  <th>Description:</th>
  39. </tr>
  40. <tr><td><code>HTTPS</code></td>                         <td>flag</td>      <td>HTTPS is being used.</td></tr>
  41. <tr><td><code>SSL_PROTOCOL</code></td>                  <td>string</td>    <td>The SSL protocol version (SSLv2, SSLv3, TLSv1)</td></tr>
  42. <tr><td><code>SSL_SESSION_ID</code></td>                <td>string</td>    <td>The hex-encoded SSL session id</td></tr>
  43. <tr><td><code>SSL_CIPHER</code></td>                    <td>string</td>    <td>The cipher specification name</td></tr>
  44. <tr><td><code>SSL_CIPHER_EXPORT</code></td>             <td>string</td>    <td><code>true</code> if cipher is an export cipher</td></tr>
  45. <tr><td><code>SSL_CIPHER_USEKEYSIZE</code></td>         <td>number</td>    <td>Number of cipher bits (actually used)</td></tr>
  46. <tr><td><code>SSL_CIPHER_ALGKEYSIZE</code></td>         <td>number</td>    <td>Number of cipher bits (possible)</td></tr>
  47. <tr><td><code>SSL_VERSION_INTERFACE</code></td>         <td>string</td>    <td>The mod_ssl program version</td></tr>
  48. <tr><td><code>SSL_VERSION_LIBRARY</code></td>           <td>string</td>    <td>The OpenSSL program version</td></tr>
  49. <tr><td><code>SSL_CLIENT_M_VERSION</code></td>          <td>string</td>    <td>The version of the client certificate</td></tr>
  50. <tr><td><code>SSL_CLIENT_M_SERIAL</code></td>           <td>string</td>    <td>The serial of the client certificate</td></tr>
  51. <tr><td><code>SSL_CLIENT_S_DN</code></td>               <td>string</td>    <td>Subject DN in client's certificate</td></tr>
  52. <tr><td><code>SSL_CLIENT_S_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of client's Subject DN</td></tr>
  53. <tr><td><code>SSL_CLIENT_I_DN</code></td>               <td>string</td>    <td>Issuer DN of client's certificate</td></tr>
  54. <tr><td><code>SSL_CLIENT_I_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of client's Issuer DN</td></tr>
  55. <tr><td><code>SSL_CLIENT_V_START</code></td>            <td>string</td>    <td>Validity of client's certificate (start time)</td></tr>
  56. <tr><td><code>SSL_CLIENT_V_END</code></td>              <td>string</td>    <td>Validity of client's certificate (end time)</td></tr>
  57. <tr><td><code>SSL_CLIENT_A_SIG</code></td>              <td>string</td>    <td>Algorithm used for the signature of client's certificate</td></tr>
  58. <tr><td><code>SSL_CLIENT_A_KEY</code></td>              <td>string</td>    <td>Algorithm used for the public key of client's certificate</td></tr>
  59. <tr><td><code>SSL_CLIENT_CERT</code></td>               <td>string</td>    <td>PEM-encoded client certificate</td></tr>
  60. <tr><td><code>SSL_CLIENT_CERT_CHAIN</code><em>n</em></td> <td>string</td>    <td>PEM-encoded certificates in client certificate chain</td></tr>
  61. <tr><td><code>SSL_CLIENT_VERIFY</code></td>             <td>string</td>    <td><code>NONE</code>, <code>SUCCESS</code>, <code>GENEROUS</code> or <code>FAILED:</code><em>reason</em></td></tr>
  62. <tr><td><code>SSL_SERVER_M_VERSION</code></td>          <td>string</td>    <td>The version of the server certificate</td></tr>
  63. <tr><td><code>SSL_SERVER_M_SERIAL</code></td>           <td>string</td>    <td>The serial of the server certificate</td></tr>
  64. <tr><td><code>SSL_SERVER_S_DN</code></td>               <td>string</td>    <td>Subject DN in server's certificate</td></tr>
  65. <tr><td><code>SSL_SERVER_S_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of server's Subject DN</td></tr>
  66. <tr><td><code>SSL_SERVER_I_DN</code></td>               <td>string</td>    <td>Issuer DN of server's certificate</td></tr>
  67. <tr><td><code>SSL_SERVER_I_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of server's Issuer DN</td></tr>
  68. <tr><td><code>SSL_SERVER_V_START</code></td>            <td>string</td>    <td>Validity of server's certificate (start time)</td></tr>
  69. <tr><td><code>SSL_SERVER_V_END</code></td>              <td>string</td>    <td>Validity of server's certificate (end time)</td></tr>
  70. <tr><td><code>SSL_SERVER_A_SIG</code></td>              <td>string</td>    <td>Algorithm used for the signature of server's certificate</td></tr>
  71. <tr><td><code>SSL_SERVER_A_KEY</code></td>              <td>string</td>    <td>Algorithm used for the public key of server's certificate</td></tr>
  72. <tr><td><code>SSL_SERVER_CERT</code></td>               <td>string</td>    <td>PEM-encoded server certificate</td></tr>
  73. <tr><td colspan="3">[ where <em>x509</em> is a component of a X.509 DN:
  74.   <code>C,ST,L,O,OU,CN,T,I,G,S,D,UID,Email</code> ]</td></tr>
  75. </table>
  76. </section>
  77.  
  78. <section id="logformats"><title>Custom Log Formats</title>
  79.  
  80. <p>When <module>mod_ssl</module> is built into Apache or at least
  81. loaded (under DSO situation) additional functions exist for the <a
  82. href="mod_log_config.html#formats">Custom Log Format</a> of 
  83. <module>mod_log_config</module>. First there is an
  84. additional ``<code>%{</code><em>varname</em><code>}x</code>''
  85. eXtension format function which can be used to expand any variables
  86. provided by any module, especially those provided by mod_ssl which can
  87. you find in the above table.</p>
  88. <p>
  89. For backward compatibility there is additionally a special
  90. ``<code>%{</code><em>name</em><code>}c</code>'' cryptography format function
  91. provided. Information about this function is provided in the <a
  92. href="../ssl/ssl_compat.html">Compatibility</a> chapter.</p>
  93. <p>
  94. Example:</p>
  95. <example>
  96. CustomLog logs/ssl_request_log \
  97.           "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
  98. </example>
  99. </section>
  100.  
  101. <directivesynopsis>
  102. <name>SSLPassPhraseDialog</name>
  103. <description>Type of pass phrase dialog for encrypted private 
  104. keys</description>
  105. <syntax>SSLPassPhraseDialog <em>type</em></syntax>
  106. <default>SSLPassPhraseDialog builtin</default>
  107. <contextlist><context>server config</context></contextlist>
  108.  
  109. <usage>
  110. <p>
  111. When Apache starts up it has to read the various Certificate (see
  112. <directive module="mod_ssl">SSLCertificateFile</directive>) and
  113. Private Key (see <directive
  114. module="mod_ssl">SSLCertificateKeyFile</directive>) files of the
  115. SSL-enabled virtual servers. Because for security reasons the Private
  116. Key files are usually encrypted, mod_ssl needs to query the
  117. administrator for a Pass Phrase in order to decrypt those files. This
  118. query can be done in two ways which can be configured by
  119. <em>type</em>:</p>
  120. <ul>
  121. <li><code>builtin</code>
  122.     <p>
  123.     This is the default where an interactive terminal dialog occurs at startup
  124.     time just before Apache detaches from the terminal. Here the administrator
  125.     has to manually enter the Pass Phrase for each encrypted Private Key file.
  126.     Because a lot of SSL-enabled virtual hosts can be configured, the
  127.     following reuse-scheme is used to minimize the dialog: When a Private Key
  128.     file is encrypted, all known Pass Phrases (at the beginning there are
  129.     none, of course) are tried. If one of those known Pass Phrases succeeds no
  130.     dialog pops up for this particular Private Key file. If none succeeded,
  131.     another Pass Phrase is queried on the terminal and remembered for the next
  132.     round (where it perhaps can be reused).</p>
  133.     <p>
  134.     This scheme allows mod_ssl to be maximally flexible (because for N encrypted
  135.     Private Key files you <em>can</em> use N different Pass Phrases - but then
  136.     you have to enter all of them, of course) while minimizing the terminal
  137.     dialog (i.e. when you use a single Pass Phrase for all N Private Key files
  138.     this Pass Phrase is queried only once).</p></li>
  139.  
  140. <li><code>exec:/path/to/program</code>
  141.     <p>
  142.     Here an external program is configured which is called at startup for each
  143.     encrypted Private Key file. It is called with two arguments (the first is
  144.     of the form ``<code>servername:portnumber</code>'', the second is either
  145.     ``<code>RSA</code>'' or ``<code>DSA</code>''), which indicate for which
  146.     server and algorithm it has to print the corresponding Pass Phrase to
  147.     <code>stdout</code>. The intent is that this external program first runs
  148.     security checks to make sure that the system is not compromised by an
  149.     attacker, and only when these checks were passed successfully it provides
  150.     the Pass Phrase.</p>
  151.     <p>
  152.     Both these security checks, and the way the Pass Phrase is determined, can
  153.     be as complex as you like. Mod_ssl just defines the interface: an
  154.     executable program which provides the Pass Phrase on <code>stdout</code>.
  155.     Nothing more or less! So, if you're really paranoid about security, here
  156.     is your interface. Anything else has to be left as an exercise to the
  157.     administrator, because local security requirements are so different.</p>
  158.     <p>
  159.     The reuse-algorithm above is used here, too. In other words: The external
  160.     program is called only once per unique Pass Phrase.</p></li>
  161. </ul>
  162. <p>
  163. Example:</p>
  164. <example>
  165. SSLPassPhraseDialog exec:/usr/local/apache/sbin/pp-filter
  166. </example>
  167. </usage>
  168. </directivesynopsis>
  169.  
  170. <directivesynopsis>
  171. <name>SSLMutex</name>
  172. <description>Semaphore for internal mutual exclusion of 
  173. operations</description>
  174. <syntax>SSLMutex <em>type</em></syntax>
  175. <default>SSLMutex none</default>
  176. <contextlist><context>server config</context></contextlist>
  177.  
  178. <usage>
  179. <p>
  180. This configures the SSL engine's semaphore (aka. lock) which is used for mutual
  181. exclusion of operations which have to be done in a synchronized way between the
  182. pre-forked Apache server processes. This directive can only be used in the
  183. global server context because it's only useful to have one global mutex.
  184. This directive is designed to closely match the
  185. <a href="http://httpd.apache.org/docs-2.0/mod/mpm_common.html#acceptmutex">AcceptMutex</a> directive</p>
  186. <p>
  187. The following Mutex <em>types</em> are available:</p>
  188. <ul>
  189. <li><code>none | no</code>
  190.     <p>
  191.     This is the default where no Mutex is used at all. Use it at your own
  192.     risk. But because currently the Mutex is mainly used for synchronizing
  193.     write access to the SSL Session Cache you can live without it as long
  194.     as you accept a sometimes garbled Session Cache. So it's not recommended
  195.     to leave this the default. Instead configure a real Mutex.</p></li>
  196. <li><code>posixsem</code>
  197.     <p>
  198.     This is an elegant Mutex variant where a Posix Semaphore is used when possible.
  199.     It is only available when the underlying platform
  200.     and APR supports it.</p></li>
  201. <li><code>sysvsem</code>
  202.     <p>
  203.     This is a somewhat elegant Mutex variant where a SystemV IPC Semaphore is used when
  204.     possible. It is possible to "leak" SysV semaphores if processes crash before
  205.     the semaphore is removed. It is only available when the underlying platform
  206.     and APR supports it.</p></li>
  207. <li><code>sem</code>
  208.     <p>
  209.     This directive tells the SSL Module to pick the "best" semaphore implementation
  210.     available to it, choosing between Posix and SystemV IPC, in that order. It is only
  211.     available when the underlying platform and APR supports at least one of the 2.</p></li>
  212. <li><code>pthread</code>
  213.     <p>
  214.     This directive tells the SSL Module to use Posix thread mutexes. It is only available
  215.     if the underlying platform and APR supports it.</p></li>
  216. <li><code>fcntl:/path/to/mutex</code>
  217.     <p>
  218.     This is a portable Mutex variant where a physical (lock-)file and the <code>fcntl()</code>
  219.     fucntion are used as the Mutex.
  220.     Always use a local disk filesystem for <code>/path/to/mutex</code> and never a file
  221.     residing on a NFS- or AFS-filesystem. It is only available when the underlying platform
  222.     and APR supports it. Note: Internally, the Process ID (PID) of the
  223.     Apache parent process is automatically appended to
  224.     <code>/path/to/mutex</code> to make it unique, so you don't have to worry
  225.     about conflicts yourself. Notice that this type of mutex is not available
  226.     under the Win32 environment. There you <em>have</em> to use the semaphore
  227.     mutex.</p></li>
  228. <li><code>flock:/path/to/mutex</code>
  229.     <p>
  230.     This is similar to the <code>fcntl:/path/to/mutex</code> method with the
  231.     exception that the <code>flock()</code> function is used to provide file
  232.     locking. It is only available when the underlying platform
  233.     and APR supports it.</p></li>
  234. <li><code>file:/path/to/mutex</code>
  235.     <p>
  236.     This directive tells the SSL Module to pick the "best" file locking implementation
  237.     available to it, choosing between <code>fcntl</code> and <code>flock</code>,
  238.     in that order. It is only available when the underlying platform and APR supports
  239.     at least one of the 2.</p></li>
  240. <li><code>default | yes</code>
  241.     <p>
  242.     This directive tells the SSL Module to pick the default locking implementation
  243.     as determined by the platform and APR.</p></li>
  244. </ul>
  245. <example><title>Example</title>
  246. SSLMutex file:/usr/local/apache/logs/ssl_mutex
  247. </example>
  248. </usage>
  249. </directivesynopsis>
  250.  
  251. <directivesynopsis>
  252. <name>SSLRandomSeed</name>
  253. <description>Pseudo Random Number Generator (PRNG) seeding 
  254. source</description>
  255. <syntax>SSLRandomSeed <em>context</em> <em>source</em> 
  256. [<em>bytes</em>]</syntax>
  257. <contextlist><context>server config</context></contextlist>
  258.  
  259. <usage>
  260. <p>
  261. This configures one or more sources for seeding the Pseudo Random Number
  262. Generator (PRNG) in OpenSSL at startup time (<em>context</em> is
  263. <code>startup</code>) and/or just before a new SSL connection is established
  264. (<em>context</em> is <code>connect</code>). This directive can only be used
  265. in the global server context because the PRNG is a global facility.</p>
  266. <p>
  267. The following <em>source</em> variants are available:</p>
  268. <ul>
  269. <li><code>builtin</code>
  270.     <p> This is the always available builtin seeding source. It's usage
  271.     consumes minimum CPU cycles under runtime and hence can be always used
  272.     without drawbacks. The source used for seeding the PRNG contains of the
  273.     current time, the current process id and (when applicable) a randomly
  274.     choosen 1KB extract of the inter-process scoreboard structure of Apache.
  275.     The drawback is that this is not really a strong source and at startup
  276.     time (where the scoreboard is still not available) this source just
  277.     produces a few bytes of entropy. So you should always, at least for the
  278.     startup, use an additional seeding source.</p></li>
  279. <li><code>file:/path/to/source</code>
  280.     <p>
  281.     This variant uses an external file <code>/path/to/source</code> as the
  282.     source for seeding the PRNG. When <em>bytes</em> is specified, only the
  283.     first <em>bytes</em> number of bytes of the file form the entropy (and
  284.     <em>bytes</em> is given to <code>/path/to/source</code> as the first
  285.     argument). When <em>bytes</em> is not specified the whole file forms the
  286.     entropy (and <code>0</code> is given to <code>/path/to/source</code> as
  287.     the first argument). Use this especially at startup time, for instance
  288.     with an available <code>/dev/random</code> and/or
  289.     <code>/dev/urandom</code> devices (which usually exist on modern Unix
  290.     derivates like FreeBSD and Linux).</p>
  291.     <p>
  292.     <em>But be careful</em>: Usually <code>/dev/random</code> provides only as
  293.     much entropy data as it actually has, i.e. when you request 512 bytes of
  294.     entropy, but the device currently has only 100 bytes available two things
  295.     can happen: On some platforms you receive only the 100 bytes while on
  296.     other platforms the read blocks until enough bytes are available (which
  297.     can take a long time). Here using an existing <code>/dev/urandom</code> is
  298.     better, because it never blocks and actually gives the amount of requested
  299.     data. The drawback is just that the quality of the received data may not
  300.     be the best.</p>
  301.     <p>
  302.     On some platforms like FreeBSD one can even control how the entropy is
  303.     actually generated, i.e. by which system interrupts. More details one can
  304.     find under <em>rndcontrol(8)</em> on those platforms. Alternatively, when
  305.     your system lacks such a random device, you can use tool
  306.     like <a href="http://www.lothar.com/tech/crypto/">EGD</a>
  307.     (Entropy Gathering Daemon) and run it's client program with the
  308.     <code>exec:/path/to/program/</code> variant (see below) or use
  309.     <code>egd:/path/to/egd-socket</code> (see below).</p></li>
  310.  
  311. <li><code>exec:/path/to/program</code>
  312.     <p>
  313.     This variant uses an external executable
  314.     <code>/path/to/program</code> as the source for seeding the
  315.     PRNG. When <em>bytes</em> is specified, only the first
  316.     <em>bytes</em> number of bytes of its <code>stdout</code> contents
  317.     form the entropy. When <em>bytes</em> is not specified, the
  318.     entirety of the data produced on <code>stdout</code> form the
  319.     entropy. Use this only at startup time when you need a very strong
  320.     seeding with the help of an external program (for instance as in
  321.     the example above with the <code>truerand</code> utility you can
  322.     find in the mod_ssl distribution which is based on the AT&T
  323.     <em>truerand</em> library). Using this in the connection context
  324.     slows down the server too dramatically, of course.  So usually you
  325.     should avoid using external programs in that context.</p></li>
  326. <li><code>egd:/path/to/egd-socket</code> (Unix only)
  327.     <p>
  328.     This variant uses the Unix domain socket of the
  329.     external Entropy Gathering Daemon (EGD) (see <a
  330.     href="http://www.lothar.com/tech/crypto/">http://www.lothar.com/tech
  331.     /crypto/</a>) to seed the PRNG. Use this if no random device exists
  332.     on your platform.</p></li>
  333. </ul>
  334. <example><title>Example</title>
  335. SSLRandomSeed startup builtin<br />
  336. SSLRandomSeed startup file:/dev/random<br />
  337. SSLRandomSeed startup file:/dev/urandom 1024<br />
  338. SSLRandomSeed startup exec:/usr/local/bin/truerand 16<br />
  339. SSLRandomSeed connect builtin<br />
  340. SSLRandomSeed connect file:/dev/random<br />
  341. SSLRandomSeed connect file:/dev/urandom 1024<br />
  342. </example>
  343. </usage>
  344. </directivesynopsis>
  345.  
  346. <directivesynopsis>
  347. <name>SSLSessionCache</name>
  348. <description>Type of the global/inter-process SSL Session 
  349. Cache</description>
  350. <syntax>SSLSessionCache <em>type</em></syntax>
  351. <default>SSLSessionCache none</default>
  352. <contextlist><context>server config</context></contextlist>
  353.  
  354. <usage>
  355. <p>
  356. This configures the storage type of the global/inter-process SSL Session
  357. Cache. This cache is an optional facility which speeds up parallel request
  358. processing. For requests to the same server process (via HTTP keep-alive),
  359. OpenSSL already caches the SSL session information locally. But because modern
  360. clients request inlined images and other data via parallel requests (usually
  361. up to four parallel requests are common) those requests are served by
  362. <em>different</em> pre-forked server processes. Here an inter-process cache
  363. helps to avoid unneccessary session handshakes.</p>
  364. <p>
  365. The following two storage <em>type</em>s are currently supported:</p>
  366. <ul>
  367. <li><code>none</code>
  368.     <p>
  369.     This is the default and just disables the global/inter-process Session
  370.     Cache. There is no drawback in functionality, but a noticeable speed
  371.     penalty can be observed.</p></li>
  372. <li><code>dbm:/path/to/datafile</code>
  373.     <p>
  374.     This makes use of a DBM hashfile on the local disk to synchronize the
  375.     local OpenSSL memory caches of the server processes. The slight increase
  376.     in I/O on the server results in a visible request speedup for your
  377.     clients, so this type of storage is generally recommended.</p></li>
  378. <li><code>shm:/path/to/datafile</code>[<code>(</code><em>size</em><code>)</code>]
  379.     <p>
  380.     This makes use of a high-performance hash table (approx. <em>size</em> bytes
  381.     in size) inside a shared memory segment in RAM (established via
  382.     <code>/path/to/datafile</code>) to synchronize the local OpenSSL memory
  383.     caches of the server processes. This storage type is not available on all
  384.     platforms.</p></li>
  385. </ul>
  386. <example><title>Examples</title>
  387. SSLSessionCache dbm:/usr/local/apache/logs/ssl_gcache_data<br />
  388. SSLSessionCache shm:/usr/local/apache/logs/ssl_gcache_data(512000)
  389. </example>
  390. </usage>
  391. </directivesynopsis>
  392.  
  393. <directivesynopsis>
  394. <name>SSLSessionCacheTimeout</name>
  395. <description>Number of seconds before an SSL session expires
  396. in the Session Cache</description>
  397. <syntax>SSLSessionCacheTimeout <em>seconds</em></syntax>
  398. <default>SSLSessionCacheTimeout 300</default>
  399. <contextlist><context>server config</context>
  400. <context>virtual host</context></contextlist>
  401.  
  402. <usage>
  403. <p>
  404. This directive sets the timeout in seconds for the information stored in the
  405. global/inter-process SSL Session Cache and the OpenSSL internal memory cache.
  406. It can be set as low as 15 for testing, but should be set to higher
  407. values like 300 in real life.</p>
  408. <example><title>Example</title>
  409. SSLSessionCacheTimeout 600
  410. </example>
  411. </usage>
  412. </directivesynopsis>
  413.  
  414. <directivesynopsis>
  415. <name>SSLEngine</name>
  416. <description>SSL Engine Operation Switch</description>
  417. <syntax>SSLEngine on|off</syntax>
  418. <default>SSLEngine off</default>
  419. <contextlist><context>server config</context>
  420. <context>virtual host</context></contextlist>
  421.  
  422. <usage>
  423. <p>
  424. This directive toggles the usage of the SSL/TLS Protocol Engine. This
  425. is usually used inside a <directive module="core"
  426. type="section">VirtualHost</directive> section to enable SSL/TLS for a
  427. particular virtual host. By default the SSL/TLS Protocol Engine is
  428. disabled for both the main server and all configured virtual hosts.</p>
  429. <example><title>Example</title>
  430. <VirtualHost _default_:443><br />
  431. SSLEngine on<br />
  432. ...<br />
  433. </VirtualHost>
  434. </example>
  435. </usage>
  436. </directivesynopsis>
  437.  
  438. <directivesynopsis>
  439. <name>SSLProtocol</name>
  440. <description>Configure usable SSL protocol flavors</description>
  441. <syntax>SSLProtocol [+|-]<em>protocol</em> ...</syntax>
  442. <default>SSLProtocol all</default>
  443. <contextlist><context>server config</context>
  444. <context>virtual host</context></contextlist>
  445. <override>Options</override>
  446.  
  447. <usage><!-- XXX Why does this have an override and not .htaccess context? -->
  448. <p>
  449. This directive can be used to control the SSL protocol flavors mod_ssl should
  450. use when establishing its server environment. Clients then can only connect
  451. with one of the provided protocols.</p>
  452. <p>
  453. The available (case-insensitive) <em>protocol</em>s are:</p>
  454. <ul>
  455. <li><code>SSLv2</code>
  456.     <p>
  457.     This is the Secure Sockets Layer (SSL) protocol, version 2.0. It is the
  458.     original SSL protocol as designed by Netscape Corporation.</p></li>
  459.  
  460. <li><code>SSLv3</code>
  461.     <p>
  462.     This is the Secure Sockets Layer (SSL) protocol, version 3.0. It is the
  463.     successor to SSLv2 and the currently (as of February 1999) de-facto
  464.     standardized SSL protocol from Netscape Corporation. It's supported by
  465.     almost all popular browsers.</p></li>
  466.  
  467. <li><code>TLSv1</code>
  468.     <p>
  469.     This is the Transport Layer Security (TLS) protocol, version 1.0. It is the
  470.     successor to SSLv3 and currently (as of February 1999) still under
  471.     construction by the Internet Engineering Task Force (IETF). It's still
  472.     not supported by any popular browsers.</p></li>
  473.  
  474. <li><code>All</code>
  475.     <p>
  476.     This is a shortcut for ``<code>+SSLv2 +SSLv3 +TLSv1</code>'' and a
  477.     convinient way for enabling all protocols except one when used in
  478.     combination with the minus sign on a protocol as the example above 
  479.     shows.</p></li>
  480. </ul>
  481. <example><title>Example</title>
  482. #   enable SSLv3 and TLSv1, but not SSLv2<br />
  483. SSLProtocol all -SSLv2
  484. </example>
  485. </usage>
  486. </directivesynopsis>
  487.  
  488. <directivesynopsis>
  489. <name>SSLCipherSuite</name>
  490. <description>Cipher Suite available for negotiation in SSL 
  491. handshake</description>
  492. <syntax>SSLCipherSuite <em>cipher-spec</em></syntax>
  493. <default>SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</default>
  494. <contextlist><context>server config</context>
  495. <context>virtual host</context>
  496. <context>directory</context>
  497. <context>.htaccess</context></contextlist>
  498. <override>AuthConfig</override>
  499.  
  500. <usage>
  501. <p>
  502. This complex directive uses a colon-separated <em>cipher-spec</em> string
  503. consisting of OpenSSL cipher specifications to configure the Cipher Suite the
  504. client is permitted to negotiate in the SSL handshake phase. Notice that this
  505. directive can be used both in per-server and per-directory context. In
  506. per-server context it applies to the standard SSL handshake when a connection
  507. is established. In per-directory context it forces a SSL renegotation with the
  508. reconfigured Cipher Suite after the HTTP request was read but before the HTTP
  509. response is sent.</p>
  510. <p>
  511. An SSL cipher specification in <em>cipher-spec</em> is composed of 4 major
  512. attributes plus a few extra minor ones:</p>
  513. <ul>
  514. <li><em>Key Exchange Algorithm</em>:<br />
  515.     RSA or Diffie-Hellman variants.
  516. </li>
  517. <li><em>Authentication Algorithm</em>:<br />
  518.     RSA, Diffie-Hellman, DSS or none.
  519. </li>
  520. <li><em>Cipher/Encryption Algorithm</em>:<br />
  521.     DES, Triple-DES, RC4, RC2, IDEA or none.
  522. </li>
  523. <li><em>MAC Digest Algorithm</em>:<br />
  524.     MD5, SHA or SHA1.
  525. </li>
  526. </ul>
  527. <p>An SSL cipher can also be an export cipher and is either a SSLv2 or SSLv3/TLSv1
  528. cipher (here TLSv1 is equivalent to SSLv3). To specify which ciphers to use,
  529. one can either specify all the Ciphers, one at a time, or use aliases to
  530. specify the preference and order for the ciphers (see <a href="#table1">Table
  531. 1</a>).</p>
  532.  
  533. <table border="1">
  534. <tr><th>Tag</th> <th>Description</th></tr>
  535. <tr><td colspan="2"><em>Key Exchange Algorithm:</em></td></tr>
  536. <tr><td><code>kRSA</code></td>   <td>RSA key exchange</td></tr>
  537. <tr><td><code>kDHr</code></td>   <td>Diffie-Hellman key exchange with RSA key</td></tr>
  538. <tr><td><code>kDHd</code></td>   <td>Diffie-Hellman key exchange with DSA key</td></tr>
  539. <tr><td><code>kEDH</code></td>   <td>Ephemeral (temp.key) Diffie-Hellman key exchange (no cert)</td>   </tr>
  540. <tr><td colspan="2"><em>Authentication Algorithm:</em></td></tr>
  541. <tr><td><code>aNULL</code></td>  <td>No authentication</td></tr>
  542. <tr><td><code>aRSA</code></td>   <td>RSA authentication</td></tr>
  543. <tr><td><code>aDSS</code></td>   <td>DSS authentication</td> </tr>
  544. <tr><td><code>aDH</code></td>    <td>Diffie-Hellman authentication</td></tr>
  545. <tr><td colspan="2"><em>Cipher Encoding Algorithm:</em></td></tr>
  546. <tr><td><code>eNULL</code></td>  <td>No encoding</td>         </tr>
  547. <tr><td><code>DES</code></td>    <td>DES encoding</td>        </tr>
  548. <tr><td><code>3DES</code></td>   <td>Triple-DES encoding</td> </tr>
  549. <tr><td><code>RC4</code></td>    <td>RC4 encoding</td>       </tr>
  550. <tr><td><code>RC2</code></td>    <td>RC2 encoding</td>       </tr>
  551. <tr><td><code>IDEA</code></td>   <td>IDEA encoding</td>       </tr>
  552. <tr><td colspan="2"><em>MAC Digest Algorithm</em>:</td></tr>
  553. <tr><td><code>MD5</code></td>    <td>MD5 hash function</td></tr>
  554. <tr><td><code>SHA1</code></td>   <td>SHA1 hash function</td></tr>
  555. <tr><td><code>SHA</code></td>    <td>SHA hash function</td> </tr>
  556. <tr><td colspan="2"><em>Aliases:</em></td></tr>
  557. <tr><td><code>SSLv2</code></td>  <td>all SSL version 2.0 ciphers</td></tr>
  558. <tr><td><code>SSLv3</code></td>  <td>all SSL version 3.0 ciphers</td> </tr>
  559. <tr><td><code>TLSv1</code></td>  <td>all TLS version 1.0 ciphers</td> </tr>
  560. <tr><td><code>EXP</code></td>    <td>all export ciphers</td>  </tr>
  561. <tr><td><code>EXPORT40</code></td> <td>all 40-bit export ciphers only</td>  </tr>
  562. <tr><td><code>EXPORT56</code></td> <td>all 56-bit export ciphers only</td>  </tr>
  563. <tr><td><code>LOW</code></td>    <td>all low strength ciphers (no export, single DES)</td></tr>
  564. <tr><td><code>MEDIUM</code></td> <td>all ciphers with 128 bit encryption</td> </tr>
  565. <tr><td><code>HIGH</code></td>   <td>all ciphers using Triple-DES</td>     </tr>
  566. <tr><td><code>RSA</code></td>    <td>all ciphers using RSA key exchange</td> </tr>
  567. <tr><td><code>DH</code></td>     <td>all ciphers using Diffie-Hellman key exchange</td> </tr>
  568. <tr><td><code>EDH</code></td>    <td>all ciphers using Ephemeral Diffie-Hellman key exchange</td> </tr>
  569. <tr><td><code>ADH</code></td>    <td>all ciphers using Anonymous Diffie-Hellman key exchange</td> </tr>
  570. <tr><td><code>DSS</code></td>    <td>all ciphers using DSS authentication</td> </tr>
  571. <tr><td><code>NULL</code></td>   <td>all ciphers using no encryption</td> </tr>
  572. </table>
  573. <p>
  574. Now where this becomes interesting is that these can be put together
  575. to specify the order and ciphers you wish to use. To speed this up
  576. there are also aliases (<code>SSLv2, SSLv3, TLSv1, EXP, LOW, MEDIUM,
  577. HIGH</code>) for certain groups of ciphers. These tags can be joined
  578. together with prefixes to form the <em>cipher-spec</em>. Available
  579. prefixes are:</p>
  580. <ul>
  581. <li>none: add cipher to list</li>
  582. <li><code>+</code>: add ciphers to list and pull them to current location in list</li>
  583. <li><code>-</code>: remove cipher from list (can be added later again)</li>
  584. <li><code>!</code>: kill cipher from list completely (can <strong>not</strong> be added later again)</li>
  585. </ul>
  586. <p>A simpler way to look at all of this is to use the ``<code>openssl ciphers
  587. -v</code>'' command which provides a nice way to successively create the
  588. correct <em>cipher-spec</em> string. The default <em>cipher-spec</em> string
  589. is ``<code>ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</code>'' which
  590. means the following: first, remove from consideration any ciphers that do not
  591. authenticate, i.e. for SSL only the Anonymous Diffie-Hellman ciphers. Next,
  592. use ciphers using RC4 and RSA. Next include the high, medium and then the low
  593. security ciphers. Finally <em>pull</em> all SSLv2 and export ciphers to the
  594. end of the list.</p>
  595. <example>
  596. <pre>
  597. $ openssl ciphers -v 'ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP'
  598. NULL-SHA                SSLv3 Kx=RSA      Au=RSA  Enc=None      Mac=SHA1
  599. NULL-MD5                SSLv3 Kx=RSA      Au=RSA  Enc=None      Mac=MD5
  600. EDH-RSA-DES-CBC3-SHA    SSLv3 Kx=DH       Au=RSA  Enc=3DES(168) Mac=SHA1
  601. ...                     ...               ...     ...           ...
  602. EXP-RC4-MD5             SSLv3 Kx=RSA(512) Au=RSA  Enc=RC4(40)   Mac=MD5  export
  603. EXP-RC2-CBC-MD5         SSLv2 Kx=RSA(512) Au=RSA  Enc=RC2(40)   Mac=MD5  export
  604. EXP-RC4-MD5             SSLv2 Kx=RSA(512) Au=RSA  Enc=RC4(40)   Mac=MD5  export
  605. </pre>
  606. </example>
  607. <p>The complete list of particular RSA & DH ciphers for SSL is given in <a
  608. href="#table2">Table 2</a>.</p>
  609. <example><title>Example</title>
  610. SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW
  611. </example>
  612. <table border="1">
  613. <tr><th>Cipher-Tag</th> <th>Protocol</th> <th>Key Ex.</th> <th>Auth.</th> <th>Enc.</th> <th>MAC</th> <th>Type</th> </tr>
  614. <tr><td colspan="7"><em>RSA Ciphers:</em></td></tr>
  615. <tr><td><code>DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>3DES(168)</td> <td>SHA1</td> <td></td> </tr>
  616. <tr><td><code>DES-CBC3-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>3DES(168)</td> <td>MD5</td> <td></td> </tr>
  617. <tr><td><code>IDEA-CBC-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>IDEA(128)</td> <td>SHA1</td> <td></td> </tr>
  618. <tr><td><code>RC4-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>SHA1</td> <td></td> </tr>
  619. <tr><td><code>RC4-MD5</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>MD5</td> <td></td> </tr>
  620. <tr><td><code>IDEA-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>IDEA(128)</td> <td>MD5</td> <td></td> </tr>
  621. <tr><td><code>RC2-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>RC2(128)</td> <td>MD5</td> <td></td> </tr>
  622. <tr><td><code>RC4-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>MD5</td> <td></td> </tr>
  623. <tr><td><code>DES-CBC-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>DES(56)</td> <td>SHA1</td> <td></td> </tr>
  624. <tr><td><code>RC4-64-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>RC4(64)</td> <td>MD5</td> <td></td> </tr>
  625. <tr><td><code>DES-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>DES(56)</td> <td>MD5</td> <td></td> </tr>
  626. <tr><td><code>EXP-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>RSA(512)</td> <td>RSA</td> <td>DES(40)</td> <td>SHA1</td> <td> export</td> </tr>
  627. <tr><td><code>EXP-RC2-CBC-MD5</code></td> <td>SSLv3</td> <td>RSA(512)</td> <td>RSA</td> <td>RC2(40)</td> <td>MD5</td> <td>  export</td> </tr>
  628. <tr><td><code>EXP-RC4-MD5</code></td> <td>SSLv3</td> <td>RSA(512)</td> <td>RSA</td> <td>RC4(40)</td> <td>MD5</td> <td>  export</td> </tr>
  629. <tr><td><code>EXP-RC2-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA(512)</td> <td>RSA</td> <td>RC2(40)</td> <td>MD5</td> <td>  export</td> </tr>
  630. <tr><td><code>EXP-RC4-MD5</code></td> <td>SSLv2</td> <td>RSA(512)</td> <td>RSA</td> <td>RC4(40)</td> <td>MD5</td> <td>  export</td> </tr>
  631. <tr><td><code>NULL-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>SHA1</td> <td></td> </tr>
  632. <tr><td><code>NULL-MD5</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>MD5</td> <td></td> </tr>
  633. <tr><td colspan="7"><em>Diffie-Hellman Ciphers:</em></td></tr>
  634. <tr><td><code>ADH-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>3DES(168)</td> <td>SHA1</td> <td></td> </tr>
  635. <tr><td><code>ADH-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>DES(56)</td> <td>SHA1</td> <td></td> </tr>
  636. <tr><td><code>ADH-RC4-MD5</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>RC4(128)</td> <td>MD5</td> <td></td> </tr>
  637. <tr><td><code>EDH-RSA-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>RSA</td> <td>3DES(168)</td> <td>SHA1</td> <td></td> </tr>
  638. <tr><td><code>EDH-DSS-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>DSS</td> <td>3DES(168)</td> <td>SHA1</td> <td></td> </tr>
  639. <tr><td><code>EDH-RSA-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>RSA</td> <td>DES(56)</td> <td>SHA1</td> <td></td> </tr>
  640. <tr><td><code>EDH-DSS-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>DSS</td> <td>DES(56)</td> <td>SHA1</td> <td></td> </tr>
  641. <tr><td><code>EXP-EDH-RSA-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH(512)</td> <td>RSA</td> <td>DES(40)</td> <td>SHA1</td> <td> export</td> </tr>
  642. <tr><td><code>EXP-EDH-DSS-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH(512)</td> <td>DSS</td> <td>DES(40)</td> <td>SHA1</td> <td> export</td> </tr>
  643. <tr><td><code>EXP-ADH-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH(512)</td> <td>None</td> <td>DES(40)</td> <td>SHA1</td> <td> export</td> </tr>
  644. <tr><td><code>EXP-ADH-RC4-MD5</code></td> <td>SSLv3</td> <td>DH(512)</td> <td>None</td> <td>RC4(40)</td> <td>MD5</td> <td>  export</td> </tr>
  645. </table>
  646. </usage>
  647. </directivesynopsis>
  648.  
  649. <directivesynopsis>
  650. <name>SSLCertificateFile</name>
  651. <description>Server PEM-encoded X.509 Certificate file</description>
  652. <syntax>SSLCertificateFile <em>file-path</em></syntax>
  653. <contextlist><context>server config</context>
  654. <context>virtual host</context></contextlist>
  655.  
  656. <usage>
  657. <p>
  658. This directive points to the PEM-encoded Certificate file for the server and
  659. optionally also to the corresponding RSA or DSA Private Key file for it
  660. (contained in the same file). If the contained Private Key is encrypted the
  661. Pass Phrase dialog is forced at startup time. This directive can be used up to
  662. two times (referencing different filenames) when both a RSA and a DSA based
  663. server certificate is used in parallel.</p>
  664. <example><title>Example</title>
  665. SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
  666. </example>
  667. </usage>
  668. </directivesynopsis>
  669.  
  670. <directivesynopsis>
  671. <name>SSLCertificateKeyFile</name>
  672. <description>Server PEM-encoded Private Key file</description>
  673. <syntax>SSLCertificateKeyFile <em>file-path</em></syntax>
  674. <contextlist><context>server config</context>
  675. <context>virtual host</context></contextlist>
  676.  
  677. <usage>
  678. <p>
  679. This directive points to the PEM-encoded Private Key file for the
  680. server. If the Private Key is not combined with the Certificate in the
  681. <directive>SSLCertificateFile</directive>, use this additional directive to
  682. point to the file with the stand-alone Private Key. When
  683. <directive>SSLCertificateFile</directive> is used and the file
  684. contains both the Certificate and the Private Key this directive need
  685. not be used. But we strongly discourage this practice.  Instead we
  686. recommend you to separate the Certificate and the Private Key. If the
  687. contained Private Key is encrypted, the Pass Phrase dialog is forced
  688. at startup time. This directive can be used up to two times
  689. (referencing different filenames) when both a RSA and a DSA based
  690. private key is used in parallel.</p>
  691. <example><title>Example</title>
  692. SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
  693. </example>
  694. </usage>
  695. </directivesynopsis>
  696.  
  697. <directivesynopsis>
  698. <name>SSLCertificateChainFile</name>
  699. <description>File of PEM-encoded Server CA Certificates</description>
  700. <syntax>SSLCertificateChainFile <em>file-path</em></syntax>
  701. <contextlist><context>server config</context>
  702. <context>virtual host</context></contextlist>
  703.  
  704. <usage>
  705. <p>
  706. This directive sets the optional <em>all-in-one</em> file where you can
  707. assemble the certificates of Certification Authorities (CA) which form the
  708. certificate chain of the server certificate. This starts with the issuing CA
  709. certificate of of the server certificate and can range up to the root CA
  710. certificate. Such a file is simply the concatenation of the various
  711. PEM-encoded CA Certificate files, usually in certificate chain order.</p>
  712. <p>
  713. This should be used alternatively and/or additionally to <directive
  714. module="mod_ssl">SSLCACertificatePath</directive> for explicitly
  715. constructing the server certificate chain which is sent to the browser
  716. in addition to the server certificate. It is especially useful to
  717. avoid conflicts with CA certificates when using client
  718. authentication. Because although placing a CA certificate of the
  719. server certificate chain into <directive
  720. module="mod_ssl">SSLCACertificatePath</directive> has the same effect
  721. for the certificate chain construction, it has the side-effect that
  722. client certificates issued by this same CA certificate are also
  723. accepted on client authentication. That's usually not one expect.</p>
  724. <p>
  725. But be careful: Providing the certificate chain works only if you are using a
  726. <em>single</em> (either RSA <em>or</em> DSA) based server certificate. If you are
  727. using a coupled RSA+DSA certificate pair, this will work only if actually both
  728. certificates use the <em>same</em> certificate chain. Else the browsers will be
  729. confused in this situation.</p>
  730. <example><title>Example</title>
  731. SSLCertificateChainFile /usr/local/apache/conf/ssl.crt/ca.crt
  732. </example>
  733. </usage>
  734. </directivesynopsis>
  735.  
  736. <directivesynopsis>
  737. <name>SSLCACertificatePath</name>
  738. <description>Directory of PEM-encoded CA Certificates for 
  739. Client Auth</description>
  740. <syntax>SSLCACertificatePath <em>directory-path</em></syntax>
  741. <contextlist><context>server config</context>
  742. <context>virtual host</context></contextlist>
  743.  
  744. <usage>
  745. <p>
  746. This directive sets the directory where you keep the Certificates of
  747. Certification Authorities (CAs) whose clients you deal with. These are used to
  748. verify the client certificate on Client Authentication.</p>
  749. <p>
  750. The files in this directory have to be PEM-encoded and are accessed through
  751. hash filenames. So usually you can't just place the Certificate files
  752. there: you also have to create symbolic links named
  753. <em>hash-value</em><code>.N</code>. And you should always make sure this directory
  754. contains the appropriate symbolic links. Use the <code>Makefile</code> which
  755. comes with mod_ssl to accomplish this task.</p>
  756. <example><title>Example</title>
  757. SSLCACertificatePath /usr/local/apache/conf/ssl.crt/
  758. </example>
  759. </usage>
  760. </directivesynopsis>
  761.  
  762. <directivesynopsis>
  763. <name>SSLCACertificateFile</name>
  764. <description>File of concatenated PEM-encoded CA Certificates 
  765. for Client Auth</description>
  766. <syntax>SSLCACertificateFile <em>file-path</em></syntax>
  767. <contextlist><context>server config</context>
  768. <context>virtual host</context></contextlist>
  769.  
  770. <usage>
  771. <p>
  772. This directive sets the <em>all-in-one</em> file where you can assemble the
  773. Certificates of Certification Authorities (CA) whose <em>clients</em> you deal
  774. with. These are used for Client Authentication. Such a file is simply the
  775. concatenation of the various PEM-encoded Certificate files, in order of
  776. preference. This can be used alternatively and/or additionally to 
  777. <directive module="mod_ssl">SSLCACertificatePath</directive>.</p>
  778. <example><title>Example</title>
  779. SSLCACertificateFile /usr/local/apache/conf/ssl.crt/ca-bundle-client.crt
  780. </example>
  781. </usage>
  782. </directivesynopsis>
  783.  
  784. <directivesynopsis>
  785. <name>SSLCARevocationPath</name>
  786. <description>Directory of PEM-encoded CA CRLs for 
  787. Client Auth</description>
  788. <syntax>SSLCARevocationPath <em>directory-path</em></syntax>
  789. <contextlist><context>server config</context>
  790. <context>virtual host</context></contextlist>
  791.  
  792. <usage>
  793. <p>
  794. This directive sets the directory where you keep the Certificate Revocation
  795. Lists (CRL) of Certification Authorities (CAs) whose clients you deal with.
  796. These are used to revoke the client certificate on Client Authentication.</p>
  797. <p>
  798. The files in this directory have to be PEM-encoded and are accessed through
  799. hash filenames. So usually you have not only to place the CRL files there.
  800. Additionally you have to create symbolic links named
  801. <em>hash-value</em><code>.rN</code>. And you should always make sure this directory
  802. contains the appropriate symbolic links. Use the <code>Makefile</code> which
  803. comes with <module>mod_ssl</module> to accomplish this task.</p>
  804. <example><title>Example</title>
  805. SSLCARevocationPath /usr/local/apache/conf/ssl.crl/
  806. </example>
  807. </usage>
  808. </directivesynopsis>
  809.  
  810. <directivesynopsis>
  811. <name>SSLCARevocationFile</name>
  812. <description>File of concatenated PEM-encoded CA CRLs for 
  813. Client Auth</description>
  814. <syntax>SSLCARevocationFile <em>file-path</em></syntax>
  815. <contextlist><context>server config</context>
  816. <context>virtual host</context></contextlist>
  817.  
  818. <usage>
  819. <p>
  820. This directive sets the <em>all-in-one</em> file where you can
  821. assemble the Certificate Revocation Lists (CRL) of Certification
  822. Authorities (CA) whose <em>clients</em> you deal with. These are used
  823. for Client Authentication.  Such a file is simply the concatenation of
  824. the various PEM-encoded CRL files, in order of preference. This can be
  825. used alternatively and/or additionally to <directive
  826. module="mod_ssl">SSLCARevocationPath</directive>.</p>
  827. <example><title>Example</title>
  828. SSLCARevocationFile /usr/local/apache/conf/ssl.crl/ca-bundle-client.crl
  829. </example>
  830. </usage>
  831. </directivesynopsis>
  832.  
  833. <directivesynopsis>
  834. <name>SSLVerifyClient</name>
  835. <description>Type of Client Certificate verification</description>
  836. <syntax>SSLVerifyClient <em>level</em></syntax>
  837. <default>SSLVerifyClient none</default>
  838. <contextlist><context>server config</context>
  839. <context>virtual host</context>
  840. <context>directory</context>
  841. <context>.htaccess</context></contextlist>
  842. <override>AuthConfig</override>
  843.  
  844. <usage>
  845. <p>
  846. This directive sets the Certificate verification level for the Client
  847. Authentication. Notice that this directive can be used both in per-server and
  848. per-directory context. In per-server context it applies to the client
  849. authentication process used in the standard SSL handshake when a connection is
  850. established. In per-directory context it forces a SSL renegotation with the
  851. reconfigured client verification level after the HTTP request was read but
  852. before the HTTP response is sent.</p>
  853. <p>
  854. The following levels are available for <em>level</em>:</p>
  855. <ul>
  856. <li><strong>none</strong>:
  857.      no client Certificate is required at all</li>
  858. <li><strong>optional</strong>:
  859.      the client <em>may</em> present a valid Certificate</li>
  860. <li><strong>require</strong>:
  861.      the client <em>has to</em> present a valid Certificate</li>
  862. <li><strong>optional_no_ca</strong>:
  863.      the client may present a valid Certificate<br />
  864.      but it need not to be (successfully) verifiable.</li>
  865. </ul>
  866. <p>In practice only levels <strong>none</strong> and
  867. <strong>require</strong> are really interesting, because level
  868. <strong>optional</strong> doesn't work with all browsers and level
  869. <strong>optional_no_ca</strong> is actually against the idea of
  870. authentication (but can be used to establish SSL test pages, etc.)</p>
  871. <example><title>Example</title>
  872. SSLVerifyClient require
  873. </example>
  874. </usage>
  875. </directivesynopsis>
  876.  
  877. <directivesynopsis>
  878. <name>SSLVerifyDepth</name>
  879. <description>Maximum depth of CA Certificates in Client 
  880. Certificate verification</description>
  881. <syntax>SSLVerifyDepth <em>number</em></syntax>
  882. <default>SSLVerifyDepth 1</default>
  883. <contextlist><context>server config</context>
  884. <context>virtual host</context>
  885. <context>directory</context>
  886. <context>.htaccess</context></contextlist>
  887. <override>AuthConfig</override>
  888.  
  889. <usage>
  890. <p>
  891. This directive sets how deeply mod_ssl should verify before deciding that the
  892. clients don't have a valid certificate. Notice that this directive can be
  893. used both in per-server and per-directory context. In per-server context it
  894. applies to the client authentication process used in the standard SSL
  895. handshake when a connection is established. In per-directory context it forces
  896. a SSL renegotation with the reconfigured client verification depth after the
  897. HTTP request was read but before the HTTP response is sent.</p>
  898. <p>
  899. The depth actually is the maximum number of intermediate certificate issuers,
  900. i.e. the number of CA certificates which are max allowed to be followed while
  901. verifying the client certificate. A depth of 0 means that self-signed client
  902. certificates are accepted only, the default depth of 1 means the client
  903. certificate can be self-signed or has to be signed by a CA which is directly
  904. known to the server (i.e. the CA's certificate is under
  905. <directive module="mod_ssl">SSLCACertificatePath</directive>), etc.</p>
  906. <example><title>Example</title>
  907. SSLVerifyDepth 10
  908. </example>
  909. </usage>
  910. </directivesynopsis>
  911.  
  912. <directivesynopsis>
  913. <name>SSLOptions</name>
  914. <description>Configure various SSL engine run-time options</description>
  915. <syntax>SSLOptions [+|-]<em>option</em> ...</syntax>
  916. <contextlist><context>server config</context>
  917. <context>virtual host</context>
  918. <context>directory</context>
  919. <context>.htaccess</context></contextlist>
  920. <override>Options</override>
  921.  
  922. <usage>
  923. <p>
  924. This directive can be used to control various run-time options on a
  925. per-directory basis. Normally, if multiple <code>SSLOptions</code>
  926. could apply to a directory, then the most specific one is taken
  927. completely; the options are not merged. However if <em>all</em> the
  928. options on the <code>SSLOptions</code> directive are preceded by a
  929. plus (<code>+</code>) or minus (<code>-</code>) symbol, the options
  930. are merged. Any options preceded by a <code>+</code> are added to the
  931. options currently in force, and any options preceded by a
  932. <code>-</code> are removed from the options currently in force.</p>
  933. <p>
  934. The available <em>option</em>s are:</p>
  935. <ul>
  936. <li><code>StdEnvVars</code>
  937.     <p>
  938.     When this option is enabled, the standard set of SSL related CGI/SSI
  939.     environment variables are created. This per default is disabled for
  940.     performance reasons, because the information extraction step is a
  941.     rather expensive operation. So one usually enables this option for
  942.     CGI and SSI requests only.</p>
  943. </li>
  944. <li><code>CompatEnvVars</code>
  945.     <p>
  946.     When this option is enabled, additional CGI/SSI environment variables are
  947.     created for backward compatibility to other Apache SSL solutions. Look in
  948.     the <a href="../ssl/ssl_compat.html">Compatibility</a> chapter for details
  949.     on the particular variables generated.</p>
  950. </li>
  951. <li><code>ExportCertData</code>
  952.     <p>
  953.     When this option is enabled, additional CGI/SSI environment variables are
  954.     created: <code>SSL_SERVER_CERT</code>, <code>SSL_CLIENT_CERT</code> and
  955.     <code>SSL_CLIENT_CERT_CHAIN</code><em>n</em> (with <em>n</em> = 0,1,2,..).
  956.     These contain the PEM-encoded X.509 Certificates of server and client for
  957.     the current HTTPS connection and can be used by CGI scripts for deeper
  958.     Certificate checking. Additionally all other certificates of the client
  959.     certificate chain are provided, too. This bloats up the environment a
  960.     little bit which is why you have to use this option to enable it on
  961.     demand.</p>
  962. </li>
  963. <li><code>FakeBasicAuth</code>
  964.     <p>
  965.     When this option is enabled, the Subject Distinguished Name (DN) of the
  966.     Client X509 Certificate is translated into a HTTP Basic Authorization
  967.     username. This means that the standard Apache authentication methods can
  968.     be used for access control. The user name is just the Subject of the
  969.     Client's X509 Certificate (can be determined by running OpenSSL's
  970.     <code>openssl x509</code> command: <code>openssl x509 -noout -subject -in
  971.     </code><em>certificate</em><code>.crt</code>). Note that no password is
  972.     obtained from the user. Every entry in the user file needs this password:
  973.     ``<code>xxj31ZMTZzkVA</code>'', which is the DES-encrypted version of the
  974.     word `<code>password</code>''. Those who live under MD5-based encryption
  975.     (for instance under FreeBSD or BSD/OS, etc.) should use the following MD5
  976.     hash of the same word: ``<code>$1$OXLyS...$Owx8s2/m9/gfkcRVXzgoE/</code>''.</p>
  977. </li>
  978. <li><code>StrictRequire</code>
  979.     <p>
  980.     This <em>forces</em> forbidden access when <code>SSLRequireSSL</code> or
  981.     <code>SSLRequire</code> successfully decided that access should be
  982.     forbidden. Usually the default is that in the case where a ``<code>Satisfy
  983.     any</code>'' directive is used, and other access restrictions are passed,
  984.     denial of access due to <code>SSLRequireSSL</code> or
  985.     <code>SSLRequire</code> is overridden (because that's how the Apache
  986.     <code>Satisfy</code> mechanism should work.) But for strict access restriction
  987.     you can use <code>SSLRequireSSL</code> and/or <code>SSLRequire</code> in
  988.     combination with an ``<code>SSLOptions +StrictRequire</code>''. Then an
  989.     additional ``<code>Satisfy Any</code>'' has no chance once mod_ssl has
  990.     decided to deny access.</p>
  991. </li>
  992. <li><code>OptRenegotiate</code>
  993.     <p>
  994.     This enables optimized SSL connection renegotiation handling when SSL
  995.     directives are used in per-directory context. By default a strict
  996.     scheme is enabled where <em>every</em> per-directory reconfiguration of
  997.     SSL parameters causes a <em>full</em> SSL renegotiation handshake. When this
  998.     option is used mod_ssl tries to avoid unnecessary handshakes by doing more
  999.     granular (but still safe) parameter checks. Nevertheless these granular
  1000.     checks sometimes maybe not what the user expects, so enable this on a
  1001.     per-directory basis only, please.</p>
  1002. </li>
  1003. </ul>
  1004. <example><title>Example</title>
  1005. SSLOptions +FakeBasicAuth -StrictRequire<br />
  1006. <Files ~ "\.(cgi|shtml)$"><br />
  1007.     SSLOptions +StdEnvVars +CompatEnvVars -ExportCertData<br />
  1008. <Files>
  1009. </example>
  1010. </usage>
  1011. </directivesynopsis>
  1012.  
  1013. <directivesynopsis>
  1014. <name>SSLRequireSSL</name>
  1015. <description>Deny access when SSL is not used for the 
  1016. HTTP request</description>
  1017. <syntax>SSLRequireSSL</syntax>
  1018. <contextlist><context>directory</context>
  1019. <context>.htaccess</context></contextlist>
  1020. <override>AuthConfig</override>
  1021.  
  1022. <usage>
  1023. <p><!-- XXX: I think the syntax is wrong -->
  1024. This directive forbids access unless HTTP over SSL (i.e. HTTPS) is enabled for
  1025. the current connection. This is very handy inside the SSL-enabled virtual
  1026. host or directories for defending against configuration errors that expose
  1027. stuff that should be protected. When this directive is present all requests
  1028. are denied which are not using SSL.</p>
  1029. <example><title>Example</title>
  1030. SSLRequireSSL
  1031. </example>
  1032. </usage>
  1033. </directivesynopsis>
  1034.  
  1035. <directivesynopsis>
  1036. <name>SSLRequire</name>
  1037. <description>Allow access only when an arbitrarily complex 
  1038. boolean expression is true</description>
  1039. <syntax>SSLRequire <em>expression</em></syntax>
  1040. <contextlist><context>directory</context>
  1041. <context>.htaccess</context></contextlist>
  1042. <override>AuthConfig</override>
  1043.  
  1044. <usage>
  1045. <p>
  1046. This directive specifies a general access requirement which has to be
  1047. fulfilled in order to allow access. It's a very powerful directive because the
  1048. requirement specification is an arbitrarily complex boolean expression
  1049. containing any number of access checks.</p>
  1050. <p>
  1051. The <em>expression</em> must match the following syntax (given as a BNF
  1052. grammar notation):</p>
  1053. <blockquote>
  1054. <pre>
  1055. expr     ::= "<strong>true</strong>" | "<strong>false</strong>"
  1056.            | "<strong>!</strong>" expr
  1057.            | expr "<strong>&&</strong>" expr
  1058.            | expr "<strong>||</strong>" expr
  1059.            | "<strong>(</strong>" expr "<strong>)</strong>"
  1060.            | comp
  1061.  
  1062. comp     ::= word "<strong>==</strong>" word | word "<strong>eq</strong>" word
  1063.            | word "<strong>!=</strong>" word | word "<strong>ne</strong>" word
  1064.            | word "<strong><</strong>"  word | word "<strong>lt</strong>" word
  1065.            | word "<strong><=</strong>" word | word "<strong>le</strong>" word
  1066.            | word "<strong>></strong>"  word | word "<strong>gt</strong>" word
  1067.            | word "<strong>>=</strong>" word | word "<strong>ge</strong>" word
  1068.            | word "<strong>in</strong>" "<strong>{</strong>" wordlist "<strong>}</strong>"
  1069.            | word "<strong>=~</strong>" regex
  1070.            | word "<strong>!~</strong>" regex
  1071.  
  1072. wordlist ::= word
  1073.            | wordlist "<strong>,</strong>" word
  1074.  
  1075. word     ::= digit
  1076.            | cstring
  1077.            | variable
  1078.            | function
  1079.  
  1080. digit    ::= [0-9]+
  1081. cstring  ::= "..."
  1082. variable ::= "<strong>%{</strong>" varname "<strong>}</strong>"
  1083. function ::= funcname "<strong>(</strong>" funcargs "<strong>)</strong>"
  1084. </pre>
  1085. </blockquote>
  1086. <p>while for <code>varname</code> any variable from <a
  1087. href="#table3">Table 3</a> can be used. Finally for
  1088. <code>funcname</code> the following functions are available:</p>
  1089. <ul>
  1090. <li><code>file(</code><em>filename</em><code>)</code>
  1091.     <p>
  1092.     This function takes one string argument and expands to the contents of the
  1093.     file. This is especially useful for matching this contents against a
  1094.     regular expression, etc.</p>
  1095. </li>
  1096. </ul>
  1097. <p>Notice that <em>expression</em> is first parsed into an internal machine
  1098. representation and then evaluated in a second step. Actually, in Global and
  1099. Per-Server Class context <em>expression</em> is parsed at startup time and
  1100. at runtime only the machine representation is executed. For Per-Directory
  1101. context this is different: here <em>expression</em> has to be parsed and
  1102. immediately executed for every request.</p>
  1103. <example><title>Example</title>
  1104. SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)-/ \<br />
  1105.             and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \<br />
  1106.             and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \<br />
  1107.             and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \<br />
  1108.             and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \<br />
  1109.            or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
  1110. </example>
  1111.  
  1112. <p><em>Standard CGI/1.0 and Apache variables:</em></p>
  1113. <pre>
  1114. HTTP_USER_AGENT        PATH_INFO             AUTH_TYPE
  1115. HTTP_REFERER           QUERY_STRING          SERVER_SOFTWARE
  1116. HTTP_COOKIE            REMOTE_HOST           API_VERSION
  1117. HTTP_FORWARDED         REMOTE_IDENT          TIME_YEAR
  1118. HTTP_HOST              IS_SUBREQ             TIME_MON
  1119. HTTP_PROXY_CONNECTION  DOCUMENT_ROOT         TIME_DAY
  1120. HTTP_ACCEPT            SERVER_ADMIN          TIME_HOUR
  1121. HTTP:headername        SERVER_NAME           TIME_MIN
  1122. THE_REQUEST            SERVER_PORT           TIME_SEC
  1123. REQUEST_METHOD         SERVER_PROTOCOL       TIME_WDAY
  1124. REQUEST_SCHEME         REMOTE_ADDR           TIME
  1125. REQUEST_URI            REMOTE_USER           ENV:<strong>variablename</strong>
  1126. REQUEST_FILENAME
  1127. </pre>
  1128. <p><em>SSL-related variables:</em></p>
  1129. <pre>
  1130. HTTPS                  SSL_CLIENT_M_VERSION   SSL_SERVER_M_VERSION
  1131.                        SSL_CLIENT_M_SERIAL    SSL_SERVER_M_SERIAL
  1132. SSL_PROTOCOL           SSL_CLIENT_V_START     SSL_SERVER_V_START
  1133. SSL_SESSION_ID         SSL_CLIENT_V_END       SSL_SERVER_V_END
  1134. SSL_CIPHER             SSL_CLIENT_S_DN        SSL_SERVER_S_DN
  1135. SSL_CIPHER_EXPORT      SSL_CLIENT_S_DN_C      SSL_SERVER_S_DN_C
  1136. SSL_CIPHER_ALGKEYSIZE  SSL_CLIENT_S_DN_ST     SSL_SERVER_S_DN_ST
  1137. SSL_CIPHER_USEKEYSIZE  SSL_CLIENT_S_DN_L      SSL_SERVER_S_DN_L
  1138. SSL_VERSION_LIBRARY    SSL_CLIENT_S_DN_O      SSL_SERVER_S_DN_O
  1139. SSL_VERSION_INTERFACE  SSL_CLIENT_S_DN_OU     SSL_SERVER_S_DN_OU
  1140.                        SSL_CLIENT_S_DN_CN     SSL_SERVER_S_DN_CN
  1141.                        SSL_CLIENT_S_DN_T      SSL_SERVER_S_DN_T
  1142.                        SSL_CLIENT_S_DN_I      SSL_SERVER_S_DN_I
  1143.                        SSL_CLIENT_S_DN_G      SSL_SERVER_S_DN_G
  1144.                        SSL_CLIENT_S_DN_S      SSL_SERVER_S_DN_S
  1145.                        SSL_CLIENT_S_DN_D      SSL_SERVER_S_DN_D
  1146.                        SSL_CLIENT_S_DN_UID    SSL_SERVER_S_DN_UID
  1147.                        SSL_CLIENT_S_DN_Email  SSL_SERVER_S_DN_Email
  1148.                        SSL_CLIENT_I_DN        SSL_SERVER_I_DN
  1149.                        SSL_CLIENT_I_DN_C      SSL_SERVER_I_DN_C
  1150.                        SSL_CLIENT_I_DN_ST     SSL_SERVER_I_DN_ST
  1151.                        SSL_CLIENT_I_DN_L      SSL_SERVER_I_DN_L
  1152.                        SSL_CLIENT_I_DN_O      SSL_SERVER_I_DN_O
  1153.                        SSL_CLIENT_I_DN_OU     SSL_SERVER_I_DN_OU
  1154.                        SSL_CLIENT_I_DN_CN     SSL_SERVER_I_DN_CN
  1155.                        SSL_CLIENT_I_DN_T      SSL_SERVER_I_DN_T
  1156.                        SSL_CLIENT_I_DN_I      SSL_SERVER_I_DN_I
  1157.                        SSL_CLIENT_I_DN_G      SSL_SERVER_I_DN_G
  1158.                        SSL_CLIENT_I_DN_S      SSL_SERVER_I_DN_S
  1159.                        SSL_CLIENT_I_DN_D      SSL_SERVER_I_DN_D
  1160.                        SSL_CLIENT_I_DN_UID    SSL_SERVER_I_DN_UID
  1161.                        SSL_CLIENT_I_DN_Email  SSL_SERVER_I_DN_Email
  1162.                        SSL_CLIENT_A_SIG       SSL_SERVER_A_SIG
  1163.                        SSL_CLIENT_A_KEY       SSL_SERVER_A_KEY
  1164.                        SSL_CLIENT_CERT        SSL_SERVER_CERT
  1165.                        SSL_CLIENT_CERT_CHAIN<strong>n</strong>
  1166.                        SSL_CLIENT_VERIFY
  1167. </pre>
  1168. </usage>
  1169. </directivesynopsis>
  1170.  
  1171. <directivesynopsis>
  1172. <name>SSLProxyMachineCertificatePath</name>
  1173. <description>Directory of PEM-encoded CA certificates for proxy server client certificates</description>
  1174. <syntax>SSLProxyMachineCertificatePath <em>directory</em></syntax>
  1175. <contextlist><context>server config</context></contextlist>
  1176. <override>Not applicable</override>
  1177.  
  1178. <usage>
  1179. <p>
  1180. This directive sets the directory where you keep the certificates of
  1181. Certification Authorities (CAs) whose proxy client certificates are used for
  1182. authentication of the proxy server to remote servers.
  1183. </p>
  1184. <p>The files in this directory must be PEM-encoded and are accessed through
  1185. hash filenames. Additionally, you must create symbolic links named
  1186. <code><em>hash-value</em>.N</code>. And you should always make sure this
  1187. directory contains the appropriate symbolic links. Use the Makefile which
  1188. comes with mod_ssl to accomplish this task.
  1189. </p>
  1190. <p>
  1191. Example:</p>
  1192. <example>
  1193. SSLProxyMachineCertificatePath /usr/local/apache/conf/ssl.crt/
  1194. </example> 
  1195. </usage> 
  1196. </directivesynopsis>
  1197.  
  1198.  
  1199. <directivesynopsis>
  1200. <name>SSLProxyMachineCertificateFile</name>
  1201. <description>File of concatenated PEM-encoded CA certificates for proxy server client certificates</description>
  1202. <syntax>SSLProxyMachineCertificateFile <em>filename</em></syntax>
  1203. <contextlist><context>server config</context></contextlist>
  1204. <override>Not applicable</override>
  1205.  
  1206. <usage>
  1207. <p>
  1208. This directive sets the all-in-one file where you keep the certificates of
  1209. Certification Authorities (CAs) whose proxy client certificates are used for
  1210. authentication of the proxy server to remote servers.
  1211. </p>
  1212. <p>
  1213. This referenced file is simply the concatenation of the various PEM-encoded
  1214. certificate files, in order of preference. Use this directive alternatively
  1215. or additionally to <code>SSLProxyMachineCertificatePath</code>.
  1216. </p>
  1217. <p>
  1218. Example:</p>
  1219. <example>
  1220. SSLProxyMachineCertificatePath /usr/local/apache/conf/ssl.crt/
  1221. </example> 
  1222. </usage> 
  1223. </directivesynopsis>
  1224.  
  1225. <directivesynopsis>
  1226. <name>SSLProxyVerify</name>
  1227. <description>Type of remote server Certificate verification</description>
  1228. <syntax>SSLProxyVerify <em>level</em></syntax>
  1229. <default>SSLProxyVerify none</default>
  1230. <contextlist><context>server config</context>
  1231. <context>virtual host</context>
  1232. <context>directory</context>
  1233. <context>.htaccess</context></contextlist>
  1234. <override>AuthConfig</override>
  1235.  
  1236. <usage>
  1237. <p>
  1238. This directive sets the Certificate verification level for the remote server
  1239. Authentication. Notice that this directive can be used both in per-server and
  1240. per-directory context. In per-server context it applies to the remote server
  1241. authentication process used in the standard SSL handshake when a connection is
  1242. established. In per-directory context it forces a SSL renegotation with the
  1243. reconfigured remote server verification level after the HTTP request was read but
  1244. before the HTTP response is sent.</p>
  1245. <p>
  1246. The following levels are available for <em>level</em>:</p>
  1247. <ul>
  1248. <li><strong>none</strong>:
  1249.      no remote server Certificate is required at all</li>
  1250. <li><strong>optional</strong>:
  1251.      the remote server <em>may</em> present a valid Certificate</li>
  1252. <li><strong>require</strong>:
  1253.      the remote server <em>has to</em> present a valid Certificate</li>
  1254. <li><strong>optional_no_ca</strong>:
  1255.      the remote server may present a valid Certificate<br />
  1256.      but it need not to be (successfully) verifiable.</li>
  1257. </ul>
  1258. <p>In practice only levels <strong>none</strong> and
  1259. <strong>require</strong> are really interesting, because level
  1260. <strong>optional</strong> doesn't work with all servers and level
  1261. <strong>optional_no_ca</strong> is actually against the idea of
  1262. authentication (but can be used to establish SSL test pages, etc.)</p>
  1263. <example><title>Example</title>
  1264. SSLProxyVerify require
  1265. </example>
  1266. </usage>
  1267. </directivesynopsis>
  1268.  
  1269. <directivesynopsis>
  1270. <name>SSLProxyVerifyDepth</name>
  1271. <description>Maximum depth of CA Certificates in Remote Server
  1272. Certificate verification</description>
  1273. <syntax>SSLProxyVerifyDepth <em>number</em></syntax>
  1274. <default>SSLProxyVerifyDepth 1</default>
  1275. <contextlist><context>server config</context>
  1276. <context>virtual host</context>
  1277. <context>directory</context>
  1278. <context>.htaccess</context></contextlist>
  1279. <override>AuthConfig</override>
  1280.  
  1281. <usage>
  1282. <p>
  1283. This directive sets how deeply mod_ssl should verify before deciding that the
  1284. remote server does not have a valid certificate. Notice that this directive can be
  1285. used both in per-server and per-directory context. In per-server context it
  1286. applies to the client authentication process used in the standard SSL
  1287. handshake when a connection is established. In per-directory context it forces
  1288. a SSL renegotation with the reconfigured remote server verification depth after the
  1289. HTTP request was read but before the HTTP response is sent.</p>
  1290. <p>
  1291. The depth actually is the maximum number of intermediate certificate issuers,
  1292. i.e. the number of CA certificates which are max allowed to be followed while
  1293. verifying the remote server certificate. A depth of 0 means that self-signed
  1294. remote server certificates are accepted only, the default depth of 1 means
  1295. the remote server certificate can be self-signed or has to be signed by a CA
  1296. which is directly known to the server (i.e. the CA's certificate is under
  1297. <directive module="mod_ssl">SSLProxyCACertificatePath</directive>), etc.</p>
  1298. <example><title>Example</title>
  1299. SSLProxyVerifyDepth 10
  1300. </example>
  1301. </usage>
  1302. </directivesynopsis>
  1303.  
  1304. <directivesynopsis>
  1305. <name>SSLProxyEngine</name>
  1306. <description>SSL Proxy Engine Operation Switch</description>
  1307. <syntax>SSLProxyEngine on|off</syntax>
  1308. <default>SSLProxyEngine off</default>
  1309. <contextlist><context>server config</context>
  1310. <context>virtual host</context></contextlist>
  1311.  
  1312. <usage>
  1313. <p>
  1314. This directive toggles the usage of the SSL/TLS Protocol Engine for proxy. This
  1315. is usually used inside a <directive module="core"
  1316. type="section">VirtualHost</directive> section to enable SSL/TLS for proxy
  1317. usage in a particular virtual host. By default the SSL/TLS Protocol Engine is
  1318. disabled for proxy image both for the main server and all configured virtual hosts.</p>
  1319. <example><title>Example</title>
  1320. <VirtualHost _default_:443><br />
  1321. SSLProxyEngine on<br />
  1322. ...<br />
  1323. </VirtualHost>
  1324. </example>
  1325. </usage>
  1326. </directivesynopsis>
  1327.  
  1328. <directivesynopsis>
  1329. <name>SSLProxyProtocol</name>
  1330. <description>Configure usable SSL protocol flavors for proxy usage</description>
  1331. <syntax>SSLProxyProtocol [+|-]<em>protocol</em> ...</syntax>
  1332. <default>SSLProxyProtocol all</default>
  1333. <contextlist><context>server config</context>
  1334. <context>virtual host</context></contextlist>
  1335. <override>Options</override>
  1336.  
  1337. <usage>
  1338. <!-- XXX Why does this have an override and not .htaccess context? -->
  1339. <p>
  1340. This directive can be used to control the SSL protocol flavors mod_ssl should
  1341. use when establishing its server environment for proxy . It will only connect
  1342. to servers using one of the provided protocols.</p>
  1343. <p>Please refer to <directive module="mod_ssl">SSLProtocol</directive>
  1344. for additional information.
  1345. </p>
  1346. </usage>
  1347. </directivesynopsis>
  1348.  
  1349. <directivesynopsis>
  1350. <name>SSLProxyCipherSuite</name>
  1351. <description>Cipher Suite available for negotiation in SSL 
  1352. proxy handshake</description>
  1353. <syntax>SSLProxyCipherSuite <em>cipher-spec</em></syntax>
  1354. <default>SSLProxyCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</default>
  1355. <contextlist><context>server config</context>
  1356. <context>virtual host</context>
  1357. <context>directory</context>
  1358. <context>.htaccess</context></contextlist>
  1359. <override>AuthConfig</override>
  1360. <usage>
  1361. <p>Equivalent to <code>SSLCipherSuite</code>, but for the proxy connection.
  1362. Please refer to <directive module="mod_ssl">SSLCipherSuite</directive>
  1363. for additional information.</p>
  1364. </usage>
  1365.  
  1366. </directivesynopsis>
  1367. <directivesynopsis>
  1368. <name>SSLProxyCACertificatePath</name>
  1369. <description>Directory of PEM-encoded CA Certificates for 
  1370. Remote Server Auth</description>
  1371. <syntax>SSLProxyCACertificatePath <em>directory-path</em></syntax>
  1372. <contextlist><context>server config</context>
  1373. <context>virtual host</context></contextlist>
  1374.  
  1375. <usage>
  1376. <p>
  1377. This directive sets the directory where you keep the Certificates of
  1378. Certification Authorities (CAs) whose remote servers you deal with. These are used to
  1379. verify the remote server certificate on Remote Server Authentication.</p>
  1380. <p>
  1381. The files in this directory have to be PEM-encoded and are accessed through
  1382. hash filenames. So usually you can't just place the Certificate files
  1383. there: you also have to create symbolic links named
  1384. <em>hash-value</em><code>.N</code>. And you should always make sure this directory
  1385. contains the appropriate symbolic links. Use the <code>Makefile</code> which
  1386. comes with mod_ssl to accomplish this task.</p>
  1387. <example><title>Example</title>
  1388. SSLProxyCACertificatePath /usr/local/apache/conf/ssl.crt/
  1389. </example>
  1390. </usage>
  1391. </directivesynopsis>
  1392.  
  1393. <directivesynopsis>
  1394. <name>SSLProxyCACertificateFile</name>
  1395. <description>File of concatenated PEM-encoded CA Certificates 
  1396. for Remote Server Auth</description>
  1397. <syntax>SSLProxyCACertificateFile <em>file-path</em></syntax>
  1398. <contextlist><context>server config</context>
  1399. <context>virtual host</context></contextlist>
  1400.  
  1401. <usage>
  1402. <p>
  1403. This directive sets the <em>all-in-one</em> file where you can assemble the
  1404. Certificates of Certification Authorities (CA) whose <em>remote servers</em> you deal
  1405. with. These are used for Remote Server Authentication. Such a file is simply the
  1406. concatenation of the various PEM-encoded Certificate files, in order of
  1407. preference. This can be used alternatively and/or additionally to 
  1408. <directive module="mod_ssl">SSLProxyCACertificatePath</directive>.</p>
  1409. <example><title>Example</title>
  1410. SSLProxyCACertificateFile /usr/local/apache/conf/ssl.crt/ca-bundle-remote-server.crt
  1411. </example>
  1412. </usage>
  1413. </directivesynopsis>
  1414.  
  1415. <directivesynopsis>
  1416. <name>SSLProxyCARevocationPath</name>
  1417. <description>Directory of PEM-encoded CA CRLs for 
  1418. Remote Server Auth</description>
  1419. <syntax>SSLProxyCARevocationPath <em>directory-path</em></syntax>
  1420. <contextlist><context>server config</context>
  1421. <context>virtual host</context></contextlist>
  1422.  
  1423. <usage>
  1424. <p>
  1425. This directive sets the directory where you keep the Certificate Revocation
  1426. Lists (CRL) of Certification Authorities (CAs) whose remote servers you deal with.
  1427. These are used to revoke the remote server certificate on Remote Server Authentication.</p>
  1428. <p>
  1429. The files in this directory have to be PEM-encoded and are accessed through
  1430. hash filenames. So usually you have not only to place the CRL files there.
  1431. Additionally you have to create symbolic links named
  1432. <em>hash-value</em><code>.rN</code>. And you should always make sure this directory
  1433. contains the appropriate symbolic links. Use the <code>Makefile</code> which
  1434. comes with <module>mod_ssl</module> to accomplish this task.</p>
  1435. <example><title>Example</title>
  1436. SSLProxyCARevocationPath /usr/local/apache/conf/ssl.crl/
  1437. </example>
  1438. </usage>
  1439. </directivesynopsis>
  1440.  
  1441. <directivesynopsis>
  1442. <name>SSLProxyCARevocationFile</name>
  1443. <description>File of concatenated PEM-encoded CA CRLs for 
  1444. Remote Server Auth</description>
  1445. <syntax>SSLProxyCARevocationFile <em>file-path</em></syntax>
  1446. <contextlist><context>server config</context>
  1447. <context>virtual host</context></contextlist>
  1448.  
  1449. <usage>
  1450. <p>
  1451. This directive sets the <em>all-in-one</em> file where you can
  1452. assemble the Certificate Revocation Lists (CRL) of Certification
  1453. Authorities (CA) whose <em>remote servers</em> you deal with. These are used
  1454. for Remote Server Authentication.  Such a file is simply the concatenation of
  1455. the various PEM-encoded CRL files, in order of preference. This can be
  1456. used alternatively and/or additionally to <directive
  1457. module="mod_ssl">SSLProxyCARevocationPath</directive>.</p>
  1458. <example><title>Example</title>
  1459. SSLProxyCARevocationFile /usr/local/apache/conf/ssl.crl/ca-bundle-remote-server.crl
  1460. </example>
  1461. </usage>
  1462. </directivesynopsis>
  1463.  
  1464.  
  1465.  
  1466. </modulesynopsis>
  1467.